home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000217_news@columbia.edu _Tue Jan 23 09:43:33 2001.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id JAA12688
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Tue, 23 Jan 2001 09:43:33 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id JAA00690
  7.       for <kermit.misc@watsun.cc.columbia.edu>; Tue, 23 Jan 2001 09:43:33 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id JAA04555
  10.     for kermit.misc@watsun.cc.columbia.edu; Tue, 23 Jan 2001 09:25:16 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: checking for modem
  14. Date: 23 Jan 2001 14:25:13 GMT
  15. Organization: Columbia University
  16. Message-ID: <94k489$4e8$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <94jjgm$dnp$1@nnrp1.deja.com>,  <grisam@my-deja.com> wrote:
  20. : I am using a GSM modem to send out SMS (stands for Short Messaging
  21. : Service) alerts when an earthquake happens. The program is written in
  22. : Perl but the communication with the modem is done with a Kermit macro,
  23. : basically it is just a modified testmodem script that comes together
  24. : with the Kermit distribution. To send SMS I use AT commands.
  25. : Sometimes the GSM modem misbehaves but the only indication of this
  26. : happening is the non-delivery of SMS.
  27. : How do I check for presence of the modem when I do the
  28. : set line \m(device)
  29. Most script commands can succeed or fail, and you can check them with
  30. IF SUCCESS or IF FAILURE.  For example:
  31.  
  32.   set line \m(device)
  33.   if fail stop 1 \m(device) not available
  34.  
  35. AT commands to the modem should respond with "OK", so:
  36.  
  37.   output ATxxxxx\13
  38.   input 3 OK
  39.   if fail stop 1 No response from modem
  40.  
  41. - Frank